<meta charset="UTF-8">

<h1>输入时间距今时间</h1>
<div id="demo1"></div>
<script src="./utils.js"></script>
<script>
var result = ``

result += `dateFormat('2017-3-3 5:18:19') ~~~~~${dateFormat('2017-3-3 5:18:19')} <br>`
result += `dateFormat('2022-3-3 5:18:19') ~~~~~${dateFormat('2022-3-3 5:18:19')} <br>`
result += `dateFormat('2022-4-3 5:18:19') ~~~~~${dateFormat('2022-4-3 5:18:19')} <br>`
result += `dateFormat('2022-4-14 5:18:19') ~~~~${dateFormat('2022-4-14 5:18:19')} <br>`

document.querySelector('#demo1').innerHTML = result
</script>

<h1>快速获取当前时间</h1>
<div id="demo2"></div>
<script src="./utils.js"></script>
<script>
    var strdate=format ('Y-m-d H:i:s')
    document.querySelector('#demo2').innerText=strdate
</script>

<h1 id="rancolor">随机颜色</h1>
<div id="demo3"></div>
<script src="./utils.js"></script>
<script>
    var result = ''

result += `randomColor()~~~~~~~~~~${randomColor()}<br>`
result += `randomColor()~~~~~~~~~~${randomColor()}<br>`
result += `randomColor()~~~~~~~~~~${randomColor()}<br>`

document.querySelector('#demo3').innerHTML = result
</script>

<h1 id="pc">pc还是移动</h1>
<div id="demo4"></div>
<script src="./utils.js"></script>
<script>
var result = ''

result += `getPCMob()~~~~~~~~~~${getPCMob()}<br>`

document.querySelector('#demo4').innerHTML = result
</script>

<h1>判断是否是微信内置浏览器</h1>
<div id="demo5"></div>
<script>
var result = ''

result += `getWX()~~~~~~~~~~${getWX()}<br>`

document.querySelector('#demo5').innerHTML = result
</script>

<h1>判断浏览器类型</h1>
<div id="demo6"></div>
<script>
var result = ''

result += `getOs()~~~~~~~~~~${getOs()}<br>`

document.querySelector('#demo6').innerHTML = result
</script>

<div style="color: aqua;background: red;">获取标签非行内样式</div>
<script src="./utils.js"></script>
<script>
     console.log(hn)
</script>

<h1>JSON</h1>
<script src="./utils.js"></script>
<script>
    let javaData='{"wcg":2,"cg":1}'
    console.log(parse(javaData))
</script>

